package utils;

import common.dto.CouponPkgRespVo;
import common.dto.MultiAppletScenesHisPo;
import org.mapstruct.IterableMapping;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.Date;
import java.util.List;

/**
 * Created By  醉美柳舞之众星捧月
 *
 * @author songx
 * @date 2020/2/9 22:13
 */
@Mapper
public interface CouponPkgRespVoMapping {

    /**
     * 转换
     *
     * @param input 入参
     * @return 返回值
     */
    @Mapping(target = "couponCode", source = "operator")
    CouponPkgRespVo change(MultiAppletScenesHisPo input);


    /**
     * 批量的转换时间
     *
     * @param dates 时间
     * @return 字符串
     */
    @IterableMapping(dateFormat = "dd.MM.yyyy")
    List<String> stringListToDateList(List<Date> dates);

//    @Mapping(source = "price", numberFormat = "$#.00")

}
